<template>
	<view class="container">
		<!--header-->
		<!--header-->
		
		<!--banner-->
		<view class="tui-banner-swiper">
			<swiper :autoplay="true" :interval="5000" :duration="150" :circular="true" :style="{height:scrollH + 'px'}" @change="bannerChange">
				<block v-for="(item,index) in goodsBanner" :key="index">
					<swiper-item :data-index="index" @tap.stop="previewImage">
						<image :src="item" class="tui-slide-image" :style="{height:scrollH+'px'}" />
					</swiper-item>
				</block>
			</swiper>
			<tui-tag type="translucent" shape="circleLeft" size="small" class="tui-tag-class">{{bannerIndex+1}}/{{goodsBanner.length}}</tui-tag>
		</view>
		<!--banner-->
		
		<view class="tui-pro-detail">
			<view class="tui-product-title tui-border-radius">
				<view class="tui-pro-pricebox tui-padding">
					<view class="tui-pro-price">
						<view>￥<text class="tui-price">{{goodsMoney}}</text></view>
						<tui-tag size="small" :plain="true" type="high-green" shape="circle" style="line-height: 10px;margin-left: 10px;">热销</tui-tag>
					</view>
					<view class="tui-collection tui-size" @tap="doGoodsLike()">
						<tui-icon v-if="goodsIsLike != 1"  name="like" :size="20" color="#333"></tui-icon>
						<tui-icon v-if="goodsIsLike == 1" name="like-fill" :size="20" color="#ff201f"></tui-icon>
						<view class="tui-scale" :class="[goodsIsLike?'tui-icon-red':'']">收藏</view>
					</view>
				</view>
				<view class="tui-original-price tui-gray">
					商品原价 <text> ￥ {{goodsInfo.money_old}}</text>
				</view>
				<view class="tui-original-price tui-gray" v-if="goodsInfo.jia_mi > 0">
					佳米抵扣 <text> ￥ {{goodsInfo.jia_mi}} 元</text>
				</view>
			<!-- 	<view class="tui-original-price tui-gray" v-if="goodsInfo.give_jia_mi > 0">
					赠送佳米:  <text> {{goodsInfo.give_jia_mi}} </text>
				</view> -->
				<view class="tui-original-price tui-gray" >
					赠还额度:  <text> ￥ {{ give_amount }} 元</text>
				</view>
				<view class="tui-pro-titbox">
					<view class="tui-pro-title">{{goodsName}}</view>
				</view>
				<view class="tui-padding">
					<view v-if="false" class="tui-sub-title tui-size tui-gray">{{goodsTips}}</view>
					<view class="tui-sale-info tui-size tui-gray">
						<view>库存：{{goodsStock}}</view>
						<view>销量：{{goodsInfo.sold}}</view>
						<view>浏览：{{goodsInfo.view_cnt}}</view>
					</view>
				</view>
			</view>
			
			<view v-if="goodsInfo.shop_branch_show == 1" class="tui-basic-info tui-mtop tui-radius-all">
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title-xxl">商家信息</view>
					<view class="tui-tag-coupon-box">
						<tui-tag size="small" type="green" shape="circle" tui-tag-class="tui-tag-coupon">到店消费</tui-tag>
						<tui-tag v-if="false" size="small" type="primary" shape="circle" tui-tag-class="tui-tag-coupon">导航到店</tui-tag>
					</view>
				</view>
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title-xxl">商家名称</view>
					<view class="tui-selected-box">{{goodsInfo.shop_branch_name}}</view>
				</view>
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title-xxl">商家地址</view>
					<view class="tui-selected-box">{{goodsInfo.shop_branch_address}}</view>
				</view>
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title-xxl">商家电话</view>
					<view class="tui-selected-box tel-color" @click="callPhone(goodsInfo.shop_branch_tel)">{{goodsInfo.shop_branch_tel}} </view>
				</view>
			</view>
			
			
			<view class="tui-basic-info tui-mtop tui-radius-all">
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title">标签</view>
					<view class="tui-tag-coupon-box">
						<tui-tag size="small" type="gray" shape="circle" tui-tag-class="tui-tag-coupon">新品</tui-tag>
						<tui-tag size="small" type="red" shape="circle" tui-tag-class="tui-tag-coupon">热销</tui-tag>
						<tui-tag size="small" type="gray" shape="circle" tui-tag-class="tui-tag-coupon">推荐</tui-tag>
					</view>
				</view>
				<view v-if="false" class="tui-list-cell">
					<view class="tui-bold tui-cell-title">规则</view>
					<view class="tui-selected-box">排队:满5返1</view>
				</view>
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title">红包</view>
					<view  v-if="goodsInfo.is_free_goods == 1" class="tui-selected-box">该商品参与排队红包</view>
					<view  v-if="goodsInfo.is_free_goods != 1" class="tui-selected-box">该商品不参与排队红包</view>
				</view>
				<view v-if="goodsInfo.point > 0" class="tui-list-cell">
					<view class="tui-bold tui-cell-title">积分</view>
					<view class="tui-selected-box">每份赠送{{goodsInfo.point}}积分</view>
				</view>
				<view v-if="goodsInfo.jia_mi > 0" class="tui-list-cell">
					<view class="tui-bold tui-cell-title">佳米</view>
					<view class="tui-selected-box">单商品可最多使用{{goodsInfo.jia_mi}}佳米抵扣</view>
				</view>
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title">消费</view>
					<view class="tui-selected-box">该商品参与个人累计消费，有助于提升你的等级</view>
				</view>
				<view v-if="false" class="tui-list-cell">
					<view class="tui-bold tui-cell-title">评价</view>
					<view class="tui-selected-box">累计好评{{goodsRankGood}}条</view>
				</view>
				<view class="tui-list-cell">
					<view class="tui-bold tui-cell-title">说明</view>
					<view class="tui-selected-box">{{shopPostRemark}}</view>
				</view>
				
				<view class="tui-guarantee">
					<view class="tui-guarantee-item">
						<tui-icon name="circle-selected" :size="14" color="#999"></tui-icon>
						<text class="tui-pl">店铺发货</text>
					</view>
					<view class="tui-guarantee-item">
						<tui-icon name="circle-selected" :size="14" color="#999"></tui-icon>
						<text class="tui-pl">质量保证</text>
					</view>
					<view class="tui-guarantee-item">
						<tui-icon name="circle-selected" :size="14" color="#999"></tui-icon>
						<text class="tui-pl">完善售后</text>
					</view>
					<view class="tui-guarantee-item">
						<tui-icon name="circle-selected" :size="14" color="#999"></tui-icon>
						<text class="tui-pl">无忧退货</text>
					</view>
				</view>
			</view>

			<view class="tui-nomore-box">
				<tui-nomore text="宝贝详情" :visible="true" bgcolor="#f7f7f7"></tui-nomore>
			</view>
			<view class="tui-product-img tui-radius-all">
				<rich-text :nodes="goodsRemark"></rich-text>
				<!-- <image :src="'https://www.thorui.cn/img/detail/'+(index+1)+'.jpg'" v-for="(img,index) in 20" :key="index" mode="widthFix"></image> -->
			</view>
			<tui-nomore text="已经到最底了" :visible="true" bgcolor="#f7f7f7"></tui-nomore>
			<view class="tui-safearea-bottom"></view>
		</view>

		<!--底部操作栏-->
		<view class="tui-operation" v-if="goodsStatus == 1">
			<view class="tui-operation-left tui-col-5">
				<view  class="tui-operation-item" hover-class="opcity" :hover-stay-time="150" @click="goHome()">
					<tui-icon name="home" :size="22" color="#333"></tui-icon>
					<view class="tui-operation-text tui-scale-small">首页</view>
				</view>
				<view v-if="false" class="tui-operation-item" hover-class="opcity" :hover-stay-time="150" @tap="openShareBox()">
					<tui-icon name="share-fill" :size="22" color='#333'></tui-icon>
					<view class="tui-operation-text tui-scale-small">分享</view>
				</view>
				<view v-if="false" class="tui-operation-item" hover-class="opcity" :hover-stay-time="150" @tap="goMyCart()">
					<tui-icon name="cart" :size="22" color='#333'></tui-icon>
					<view class="tui-operation-text tui-scale-small">购物车</view>
				</view>
			</view>
			<view class="tui-operation-right tui-right-flex tui-col-7 tui-btnbox-4">
				<view class="tui-flex-1">
					<tui-button type="warning" shape="circle" size="mini" @click="goOrderAdd()">立即购买</tui-button>
				</view>
			</view>
		</view>
		<!--底部操作栏-->
		<view class="tui-operation" v-if="goodsStatus != 1">
			<tui-button type="warning" shape="circle" size="mini" @tap="goGoodsIndex()" > 该商品已下架，请查看其它商品 </tui-button>
		</view>


		<!--底部操作栏-->

		<!--底部选择层-->
		<tui-bottom-popup :show="popupShow" @close="hidePopup">
			<view class="tui-popup-box">
				<view class="tui-product-box tui-padding">
					<image :src="goodsLogo" class="tui-popup-img"></image>
					<view class="tui-popup-price">
						<view class="tui-pro-title-2">{{goodsName}}</view>
						<view class="tui-amount tui-bold">￥{{goodsMoney}}</view>
					</view>
				</view>
				<scroll-view scroll-y class="tui-popup-scroll">
					<view class="tui-scrollview-box">
						
						<view class="order-goods-num-div">
							<view class="tui-bold tui-attr-title">商品名称</view>
							<view class="tui-attr-box">
								<view class="tui-attr-item-name">{{goodsName}}</view>
							</view>
						</view>
						
						<view class="order-goods-num-div">
							<view class="tui-bold tui-attr-title">购买份数</view>
							<view class="tui-attr-box">
								<tui-numberbox :value="goodsNum" @change="goodsNumChange" :min="1" :max="100" :step="1"></tui-numberbox>
							</view>
						</view>
						
						<view class="order-goods-num-div">
							<view class="tui-bold tui-attr-title">备注说明</view>
							<view class="tui-attr-box">
								<input placeholder-class="tui-phcolor" class="tui-input order-remark" name="orderRemark" v-model="orderRemark" placeholder="请输入备注说明" maxlength="100" type="text" />
							</view>
						</view>
					</view>
				</scroll-view>
				<view class="tui-operation tui-operation-right tui-right-flex tui-popup-btn">
					<view v-if="false" class="tui-flex-1">
						<tui-button type="red" shape="circle" size="mini" @click="postMyCartGoodsAdd(0)">加入购物车</tui-button>
					</view>
					<view class="tui-flex-1">
						<tui-button type="warning" shape="circle" size="mini" @click="postMyCartBuyNow()">立即购买</tui-button>
					</view>
				</view>
				<view class="tui-icon tui-icon-close-fill tui-icon-close" style="color: #999;font-size:20px" @tap="hidePopup"></view>
				<!-- <tui-icon name="close-fill" color="#999" class="tui-icon-close" size="20" @tap="hidePopup"></tui-icon> -->
			</view>
		</tui-bottom-popup>
		<!--底部选择层-->
		
		<!--商品分享的层-->
		<view class="share-box" >
			<view class="share-box-mask" v-if="shareBoxFlag"></view>
			<view class="share-box-dialog" :class="shareBoxFlag ? 'share-box-open':'share-box-close'" >
				<view class="close-btn" @tap="closeShareBox">
					<tui-icon name="shut" :size="20" color="#000"></tui-icon>
				</view>
				<view class="share-box-title">分享</view>
				<view class="share-box-body">
					<view class="share-item" @tap="doCreateCanvasImage">
						<tui-icon name="wechat" :size="40" color="#40AD3E"></tui-icon>
						<view >分享给好友</view>
					</view>
					<view class="share-item" @tap="doCreateCanvasImage">
						<tui-icon name="picture" :size="30" color="#FE5E33"></tui-icon>
						<view>生成分享图片</view>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import footerMenu from "@/components/footer-menu.vue"
	import tuiIcon from "@/components/thorui/tui-icon/tui-icon.vue"
	import tuiTag from "@/components/thorui/tui-tag/tui-tag"
	import tuiBadge from "@/components/thorui/tui-badge/tui-badge"
	import tuiNomore from "@/components/thorui/tui-nomore/tui-nomore"
	import tuiButton from "@/components/thorui/tui-button/tui-button"
	import tuiTopDropdown from "@/components/thorui/tui-top-dropdown/tui-top-dropdown"
	import tuiBottomPopup from "@/components/thorui/tui-bottom-popup/tui-bottom-popup"
	import tuiNumberbox from "@/components/thorui/tui-numberbox/tui-numberbox"
	
	export default {
		components: {
			footerMenu,
			tuiIcon,
			tuiTag,
			tuiBadge,
			tuiNomore,
			tuiButton,
			tuiTopDropdown,
			tuiBottomPopup,
			tuiNumberbox,
		},
		data() {
			return {
				height: 64, //header高度
				top: 0, //标题图标距离顶部距离
				scrollH: 0, //滚动总高度
				opcity: 0,
				iconOpcity: 0.5,
				
				goodsInfo: {},
				goodsId: 0,
				goodsNum: 1,
				goodsName: '',
				goodsLogo: '',
				goodsMoney: 0,
				goodsMoneyGold: 0,
				goodsStock: 0,
				goodsStatus: 1,
				goodsSoldCnt: 0,
				goodsViewCnt: 0,
				goodsRankGood: 0,
				goodsBanner:[],
				bannerIndex: 0,
				goodsRemark:'',
				goodsTips: '商城内的绝大多数商品均免费包邮，请放心购买。',
				goodsIsLike: 0,
				shopPostRemark: '',
				give_amount:0,

				menuShow: false,
				popupShow: false,
				value: 1,
				
				orderRemark: '',		//下单的购物备注
				
				//商品分享图片的相关数据
				shareBoxFlag: false,
			}
		},
		
		methods: {
			bannerChange: function(e) {
				this.bannerIndex = e.detail.current
			},
			previewImage: function(e) {
				let index = e.currentTarget.dataset.index;
			},
			back: function() {
				uni.navigateBack()
			},
			openMenu: function() {
				this.menuShow = true
			},
			closeMenu: function() {
				this.menuShow = false
			},
			showPopup: function() {
				this.popupShow = true
			},
			hidePopup: function() {
				this.popupShow = false
			},
			change: function(e) {
				this.value = e.value
			},
			goodsNumChange: function(e) {
				this.goodsNum = e.value
			},
			
			
			//拨打电话
			callPhone(phoneNumber) {
			    uni.makePhoneCall({
			      phoneNumber: phoneNumber, // 电话号码
			      success: function () {
			        console.log('拨号成功');
			      },
			      fail: function () {
			        console.log('拨号失败');
			      }
			    });
			},
			
			//返回首页
			goHome: function() {
				uni.switchTab({
					url: '/pages/site/index'
				});
			},
			
			goOrderAdd: function() {
				uni.navigateTo({
					url: '/pages/my-order/add?goods_id=' + this.goodsId,
				});
			},
			
			//联系客服
			goKf: function() {
				window.open(this.$kfUrl);
			},
			
			goMyCart: function() {
				uni.switchTab({
					url: '/pages/my-cart/index'
				});
			},
			
			goGoodsIndex: function() {
				uni.navigateTo({
					url: '/pages/goods/index'
				});
			},
			
			getGoodsInfo: function(goodsId) {
				uni.request({
				    url: this.$apiUrl+ '/api/goods/info?goods_id='+goodsId,
					header: {
						'userId': uni.getStorageSync('userId'),
						'userToken': uni.getStorageSync('userToken'),
						'shopId': uni.getStorageSync('shopId'),
					},
				    data: {},
				    success: (res) => {
						let resData = res.data['data'];
						this.goodsInfo = resData;
						
					
						
						this.goodsName = resData.name;
						this.goodsLogo = resData.img_logo;
						this.goodsMoney = resData.money;
						this.goodsMoneyGold = resData.money_gold;
						this.goodsMoneyOriginal = resData.money_original;
						this.goodsStatus = resData.status;
						this.goodsStock = resData.stock;
						this.goodsSoldCnt = resData.sold_cnt;
						this.goodsViewCnt = resData.view_cnt;
						this.goodsRankGood = resData.rank_good;
						this.goodsBanner = resData.img_banner_list;
						this.goodsRemark = resData.remark;
						this.shopPostRemark = resData.shop_post_remark;
						this.goodsIsLike = resData.has_like;
						
						
						
						this.give_amount = Math.round(this.goodsMoney * 0.1 + this.goodsInfo.give_jia_mi + (this.goodsInfo.jia_mi * 2))
						
				    }
				});
			},
			
			
			//处理产品收藏和取消收藏
			doGoodsLike: function() {
				if(!this.goodsId) return;		//没有产品ID
				if(this.goodsIsLike == 0) {		//产品未关注
					this.postMyGoodsLikeAdd();
				}
				if(this.goodsIsLike == 1) {		//产品已关注了
					this.postMyGoodsLikeDel();
				}
			},
			
			doChooseFormat: function(formatId) {
				this.goodsFormatId = formatId;
			},
			
			//用户分享该商品的图片
			goGoodsShareImg: function() {
				uni.navigateTo({
					url: '/pages/goods/share-img'
				});
			},
			
			//产品加入收藏
			postMyGoodsLikeAdd: function() {
				uni.request({
					url: this.$apiUrl+ '/api/my-goods/like-add',
					header: {
						'userId': uni.getStorageSync('userId'),
						'userToken': uni.getStorageSync('userToken'),
'shopId': uni.getStorageSync('shopId'),
					},
					data: { goods_id: this.goodsId },
					success: (res) => {
						this.goodsIsLike = 1;
					}
				});
			},
			
			//产品取消收藏
			postMyGoodsLikeDel: function() {
				uni.request({
					url: this.$apiUrl+ '/api/my-goods/like-del',
					header: {
						'userId': uni.getStorageSync('userId'),
						'userToken': uni.getStorageSync('userToken'),
'shopId': uni.getStorageSync('shopId'),
					},
					data: { goods_id: this.goodsId },
					success: (res) => {
						this.goodsIsLike = 0;
					}
				});
			},
			
			//产品加入购物车
			postMyCartGoodsAdd: function(buyNow) {
				uni.request({
					url: this.$apiUrl+ '/api/my-cart/goods-add',
					header: {
						'userId': uni.getStorageSync('userId'),
						'userToken': uni.getStorageSync('userToken'),
'shopId': uni.getStorageSync('shopId'),
					},
					data: {
						goods_id: this.goodsId,
						goods_format: this.goodsFormatId
					},
					success: (res) => {
						let resErr = res.data['error'];
						let resMsg = res.data['msg'];
						this.hidePopup();

						if(buyNow == 1) {
							uni.reLaunch({
								url: '/pages/my-cart/index'
							});
						}else{
							this.tui.toast(resMsg, 2000, true);
						}
					}
				});
			},
			
			//立即购买
			postMyCartBuyNow: function() {
				uni.request({
					url: this.$apiUrl+ '/api/order/addSingle',
					header: {
						'userId': uni.getStorageSync('userId'),
						'userToken': uni.getStorageSync('userToken'),
					},
					data: {
						goods_id: this.goodsId,
						goods_num: 1,		//购买一件
						goods_format: this.goodsFormatId,
						order_remark: this.orderRemark
					},
					success: (res) => {
						this.hidePopup();
						let resErr = res.data['error'];
						if(resErr == 0 ) {
							let prepayId = res.data['data'];		//预支付订单的ID
							uni.navigateTo({
								url: '/pages/my-order/prepay?prepay_id=' + prepayId
							});
						}else{
							let resMsg = res.data['msg'];
							this.tui.toast(resMsg, 2000, false);
						}
					}
				});
			},
			
		},
		
		
		
		onLoad: function(options) {
			let obj = {};
			setTimeout(() => {
				uni.getSystemInfo({
					success: (res) => {
						this.width = obj.left || res.windowWidth;
						this.height = obj.top ? (obj.top + obj.height + 8) : (res.statusBarHeight + 44);
						this.top = obj.top ? (obj.top + (obj.height - 32) / 2) : (res.statusBarHeight + 6);
						this.scrollH = res.windowWidth
					}
				})
			}, 50);
			
			this.goodsId = options.id || 0;
			this.getGoodsInfo(this.goodsId);
		},
		
		onPageScroll(e) {
			let scroll = e.scrollTop <= 0 ? 0 : e.scrollTop;
			let opcity = scroll / this.scrollH;
			if (this.opcity >= 1 && opcity >= 1) {
				return;
			}
			this.opcity = opcity;
			this.iconOpcity = 0.5 * (1 - opcity < 0 ? 0 : 1 - opcity)
		},
		
		onShow() {
		}
		
		
	}
</script>

<style>

	page {
		background: #f7f7f7;
	}

	.container {
		padding-bottom: 110rpx;
	}

	.tui-header-box {
		width: 100%;
		position: fixed;
		left: 0;
		top: 0;
		z-index: 88;
	}

	.tui-header {
		width: 100%;
		font-size: 18px;
		line-height: 18px;
		font-weight: 500;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tui-header-icon {
		position: fixed;
		top: 0;
		left: 10px;
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		height: 32px;
		transform: translateZ(0);
		z-index: 99;
	}



	.tui-header-icon .tui-badge {
		background: #e41f19 !important;
		position: absolute;
		right: -4px;
	}

	.tui-icon-ml {
		margin-left: 20rpx;
	}

	.tui-icon {
		border-radius: 16px;
	}


	.tui-icon-back {
		height: 32px !important;
		width: 32px !important;
		display: block !important;
	}

	.tui-header-icon .tui-icon-more-fill {
		height: 20px !important;
		width: 20px !important;
		padding: 6px !important;
		display: block !important;
	}

	.tui-banner-swiper {
		position: relative;
	}

	.tui-banner-swiper .tui-tag-class {
		position: absolute;
		color: #fff;
		bottom: 30rpx;
		right: 0;
	}

	.tui-slide-image {
		width: 100%;
		display: block;
	}

	/*顶部菜单*/

	.tui-menu-box {
		box-sizing: border-box;
	}

	.tui-menu-header {
		font-size: 34rpx;
		color: #fff;
		height: 32px;
		display: flex;
		align-items: center;
	}

	.tui-top-dropdown {
		z-index: 99 !important;
	}

	.tui-menu-itembox {
		color: #fff;
		padding: 40rpx 10rpx 0 10rpx;
		box-sizing: border-box;
		display: flex;
		flex-wrap: wrap;
		font-size: 26rpx;
	}

	.tui-menu-item {
		width: 22%;
		height: 160rpx;
		border-radius: 24rpx;
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: center;
		background: rgba(0, 0, 0, 0.4);
		margin-right: 4%;
		margin-bottom: 4%;
	}

	.tui-menu-item:nth-of-type(4n) {
		margin-right: 0;
	}

	.tui-badge-box {
		position: relative;
	}

	.tui-badge-box .tui-badge-class {
		position: absolute;
		top: -8px;
		right: -8px;
	}

	.tui-msg-badge {
		top: -10px;
	}

	.tui-icon-up {
		position: relative;
		display: inline-block;
		left: 50%;
		transform: translateX(-50%);
	}

	.tui-menu-text {
		padding-top: 12rpx;
	}

	.tui-opcity .tui-menu-text,
	.tui-opcity .tui-badge-box {
		opacity: 0.5;
		transition: opacity 0.2s ease-in-out;
	}

	/*顶部菜单*/

	/*内容 部分*/

	.tui-padding {
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	/* #ifdef H5 */
	.tui-ptop {
		padding-top: 44px;
	}

	/* #endif */

	.tui-size {
		font-size: 24rpx;
		line-height: 24rpx;
	}

	.tui-gray {
		color: #999;
	}

	.tui-icon-red {
		color: #ff201f;
	}

	.tui-border-radius {
		border-bottom-left-radius: 24rpx;
		border-bottom-right-radius: 24rpx;
		overflow: hidden;
	}

	.tui-radius-all {
		border-radius: 24rpx;
		overflow: hidden;
	}

	.tui-mtop {
		margin-top: 26rpx;
	}

	.tui-pro-detail {
		box-sizing: border-box;
		color: #333;
	}

	.tui-product-title {
		background: #fff;
		padding: 30rpx 0;
	}

	.tui-pro-pricebox {
		display: flex;
		align-items: center;
		justify-content: space-between;
		color: #ff201f;
		font-size: 36rpx;
		font-weight: bold;
		line-height: 44rpx;
	}

	.tui-pro-price {
		display: flex;
		align-items: center;
	}

	.tui-pro-price .tui-tag-class {
		transform: scale(0.7);
		transform-origin: center center;
		line-height: 24rpx;
		font-weight: normal;
	}

	.tui-price {
		font-size: 58rpx;
	}

	.tui-original-price {
		font-size: 26rpx;
		line-height: 40rpx;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		margin-top:10rpx;
	}

	.tui-line-through {
		text-decoration: line-through;
	}

	.tui-collection {
		color: #333;
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: center;
		height: 44rpx;
	}

	.tui-scale {
		transform: scale(0.7);
		transform-origin: center center;
		line-height: 24rpx;
		font-weight: normal;
	}

	.tui-icon-collection {
		line-height: 20px !important;
		margin-bottom: 0 !important;

	}

	.tui-pro-titbox {
		font-size: 32rpx;
		font-weight: 500;
		position: relative;
		padding: 0 150rpx 0 30rpx;
		box-sizing: border-box;
	}

	.tui-pro-title {
		padding-top: 20rpx;
	}
	
	.tui-pro-title-2 {
		font-size: 30rpx;
		margin-bottom: 40rpx;
		line-height: 50rpx;
	}

	.tui-share-btn {
		display: block;
		background: none;
		margin: 0;
		padding: 0;
		border-radius: 0;
	}

	.tui-tag-share {
		display: flex;
		align-items: center;
	}

	.tui-share-position {
		position: absolute;
		right: 0;
		top: 30rpx;
	}

	.tui-share-text {
		padding-left: 8rpx;
	}

	.tui-sub-title {
		padding: 20rpx 0;
	}

	.tui-sale-info {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-top: 30rpx;
	}

	.tui-discount-box {
		background: #fff;
	}

	.tui-list-cell {
		position: relative;
		display: flex;
		align-items: center;
		font-size: 26rpx;
		line-height: 26rpx;
		padding: 36rpx 30rpx;
		box-sizing: border-box;
	}

	.tui-right {
		position: absolute;
		right: 30rpx;
		top: 30rpx;
	}

	.tui-top40 {
		top: 40rpx !important;
	}

	.tui-bold {
		font-weight: bold;
	}

	.tui-list-cell::after {
		content: '';
		position: absolute;
		border-bottom: 1rpx solid #eaeef1;
		-webkit-transform: scaleY(0.5);
		transform: scaleY(0.5);
		bottom: 0;
		right: 0;
		left: 126rpx;
	}

	.tui-last::after {
		border-bottom: 0 !important;
	}

	.tui-tag-coupon-box {
		display: flex;
		align-items: center;
	}

	.tui-tag-coupon-box .tui-tag-class {
		margin-right: 20rpx;
	}


	.tui-cell-title {
		width: 66rpx;
		padding-right: 30rpx;
		flex-shrink: 0;
	}
	
	.tui-cell-title-xxl {
		width: 126rpx;
		padding-right: 30rpx;
		flex-shrink: 0;
	}

	.tui-promotion-box {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		padding: 10rpx 0;
		width: 74%;
	}

	.tui-promotion-box .tui-tag-class {
		display: inline-block !important;
		transform: scale(0.8);
		transform-origin: 0 center;
	}

	/* .tui-inline-block {
		display: inline-block !important;
		transform: scale(0.8);
		transform-origin: 0 center;
	} */

	.tui-basic-info {
		background: #fff;
	}

	.tui-addr-box {
		width: 76%;
	}

	.tui-addr-item {
		padding: 10rpx;
		line-height: 34rpx;
	}

	.tui-guarantee {
		background: #fdfdfd;
		display: flex;
		flex-wrap: wrap;
		padding: 20rpx 30rpx 30rpx 30rpx;
		font-size: 24rpx;
	}

	.tui-guarantee-item {
		color: #999;
		padding-right: 30rpx;
		padding-top: 10rpx;
	}

	.tui-pl {
		padding-left: 4rpx;
	}

	.tui-cmt-box {
		background: #fff;
	}

	.tui-between {
		justify-content: space-between !important;
	}

	.tui-cmt-all {
		color: #ff201f;
		padding-right: 8rpx;
	}

	.tui-cmt-content {
		font-size: 26rpx;
	}

	.tui-cmt-user {
		display: flex;
		align-items: center;
	}

	.tui-acatar {
		width: 60rpx;
		height: 60rpx;
		border-radius: 30rpx;
		display: block;
		margin-right: 16rpx;
	}

	.tui-cmt {
		padding: 14rpx 0;
	}

	.tui-attr {
		font-size: 24rpx;
		color: #999;
		padding: 6rpx 0;
	}

	.tui-cmt-btn {
		padding: 50rpx 0 30rpx 0;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tui-tag-cmt {
		min-width: 130rpx;
		padding: 20rpx 52rpx !important;
		font-size: 26rpx !important;
		display: inline-block;
	}

	.tui-nomore-box {
		padding-top: 10rpx;
	}

	.tui-product-img {
		transform: translateZ(0);
	}

	.tui-product-img image {
		width: 100%;
		display: block;
	}
	
	.tui-product-img p img {
		width: 100%;
	}

	/*底部操作栏*/

	.tui-col-7 {
		width: 58.33333333%;
	}

	.tui-col-5 {
		width: 41.66666667%;
	}

	.tui-operation {
		width: 100%;
		height: 100rpx;
		/* box-sizing: border-box; */
		background: rgba(255, 255, 255, 0.98);
		position: fixed;
		display: flex;
		align-items: center;
		justify-content: space-between;
		z-index: 10;
		bottom: 0;
		left: 0;
		padding-bottom: env(safe-area-inset-bottom);
	}

	.tui-safearea-bottom {
		width: 100%;
		height: env(safe-area-inset-bottom);
	}

	.tui-operation::before {
		content: '';
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		border-top: 1rpx solid #eaeef1;
		-webkit-transform: scaleY(0.5);
		transform: scaleY(0.5);
	}

	.tui-operation-left {
		display: flex;
		align-items: center;
	}

	.tui-operation-item {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		position: relative;
	}

	.tui-operation-text {
		font-size: 22rpx;
		color: #333;
	}

	.tui-opacity {
		opacity: 0.5;
	}

	.tui-scale-small {
		transform: scale(0.9);
		transform-origin: center center;
	}

	.tui-operation-right {
		height: 100rpx;
		/* box-sizing: border-box; */
		padding-top: 0;
	}

	.tui-right-flex {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tui-btnbox-4 .tui-btn-class {
		width: 90% !important;
		display: block !important;
		font-size: 28rpx !important;
	}

	.tui-operation .tui-badge-class {
		position: absolute;
		top: -6rpx;
		/* #ifdef H5 */
		transform: translateX(50%)
			/* #endif  */
	}

	.tui-flex-1 {
		flex: 1;
	}

	/*底部操作栏*/

	/*底部选择弹层*/

	.tui-popup-class {
		border-top-left-radius: 24rpx;
		border-top-right-radius: 24rpx;
		padding-bottom: env(safe-area-inset-bottom);
	}

	.tui-popup-box {
		position: relative;
		padding: 30rpx 0 100rpx 0;
	}

	.tui-popup-btn {
		width: 100%;
		position: absolute;
		left: 0;
		bottom: 0;
	}

	.tui-popup-btn .tui-btn-class {
		width: 90% !important;
		display: block !important;
		font-size: 28rpx !important;
	}

	.tui-icon-close {
		position: absolute;
		top: 30rpx;
		right: 30rpx;
	}

	.tui-product-box {
		display: flex;
		align-items: flex-end;
		font-size: 24rpx;
		padding-bottom: 30rpx;
	}

	.tui-popup-img {
		height: 200rpx;
		width: 200rpx;
		border-radius: 24rpx;
		display: block;
	}

	.tui-popup-price {
		padding-left: 20rpx;
		padding-bottom: 8rpx;
	}

	.tui-amount {
		color: #ff201f;
		font-size: 36rpx;
	}

	.tui-number {
		font-size: 24rpx;
		line-height: 24rpx;
		padding-top: 12rpx;
		color: #999;
	}

	.tui-popup-scroll {
		height: 600rpx;
		font-size: 26rpx;
	}

	.tui-scrollview-box {
		padding: 0 30rpx 60rpx 30rpx;
		box-sizing: border-box;
	}

	.tui-attr-title {
		padding: 10rpx 0;
		color: #333;
	}

	.tui-attr-box {
		font-size: 0;
		padding: 20rpx 0;
	}

	.tui-attr-item {
		max-width: 100%;
		min-width: 200rpx;
		height: 64rpx;
		display: -webkit-inline-flex;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: #f7f7f7;
		padding: 0 26rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		margin-right: 20rpx;
		margin-bottom: 20rpx;
		font-size: 26rpx;
	}

	.tui-attr-active {
		background: #fcedea !important;
		color: #e41f19;
		font-weight: bold;
		position: relative;
	}

	.tui-attr-active::after {
		content: "";
		position: absolute;
		border: 1rpx solid #e41f19;
		width: 100%;
		height: 100%;
		border-radius: 40rpx;
		left: 0;
		top: 0;
	}

	.tui-number-box {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx 0 30rpx 0;
		box-sizing: border-box;
	}

	/*底部选择弹层*/
	
	.tui-attr-item-name {
		max-width: 100%;
		min-width: 200rpx;
		height: 64rpx;
		display: -webkit-inline-flex;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: #fff;
		padding: 0 26rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		margin-right: 20rpx;
		margin-bottom: 20rpx;
		font-size: 26rpx;
	}
	
	.order-goods-num-div{
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top:6rpx;
	}
	
	.order-goods-num{
		border:1rpx solid #ccc;
		padding: 10rpx 20rpx;
		border-radius: 10rpx;
		height: 40rpx;
		line-height: 40rpx;
		font-size: 20rpx;
	}
	
	.order-remark-div{
		margin-top:10rpx;
	}
	
	.order-remark{
		border:1rpx solid #ccc;
		padding: 10rpx 20rpx;
		border-radius: 10rpx;
		height: 40rpx;
		line-height: 40rpx;
		font-size: 20rpx;
		width: 400rpx;
	}
	
	.tel-color{
		font-weight: bold;
		font-size:32rpx;
		color:#0F75E0;
	}
	
	
	/****商品分享Canvas生成分享图片**/
	.share-box{display: flex;align-items: center;justify-content: flex-end;flex-direction: column;z-index: 105;line-height: 1;box-sizing: border-box;}
	.share-box-mask{width: 100%;height: 100%;position: fixed;top: 0;right: 0;bottom: 0;left: 0;background: rgba(0, 0, 0, 0.5);}
	.share-box-dialog {width: 750rpx;height: 310rpx;overflow: hidden;background-color: #fff;border-radius: 24rpx 24rpx 0px 0px;position: relative;box-sizing: border-box; position: fixed;bottom: 0;}
	.close-btn {padding: 20rpx 15rpx;position: absolute;top: 0rpx;right: 29rpx;}
	.share-box-title {font-size: 28rpx;color: #1c1c1c;padding: 28rpx 41rpx;background-color: #f7f7f7;}
	.share-box-body{display: flex;flex-direction: row;justify-content:space-around;font-size: 28rpx;color: #1c1c1c;}
	.share-item{display: flex;flex-direction:column;justify-content: center;justify-content:space-around;line-height: 40px;padding-top: 30px;text-align: center;}
	.share-box-open {transition: all 0.3s ease-out; transform: translateY(0);}
	.share-box-close {transition: all 0.3s ease-out; transform: translateY(310rpx);}
	
	.canvasWrap{width: 100%;height: 100%;position: fixed;top: 0;right: 0;bottom: 0;left: 0;background: rgba(0, 0, 0, 0.5);z-index:108;}
	.canvas{position: fixed !important;display: block !important;width: 300px;height: 530px;z-index: -300;left:80rpx !important;top: 80rpx !important;text-align: center;}
	
	.canvasWrapImg{margin: 0 auto;left:-150px;}
	.canvasImg{position: fixed !important;display: block !important;width: 300px;height: 530px;z-index: 999;left:80rpx !important;top: 80rpx !important;text-align: center;}
</style>